package com.example.demo.pojo.zuwang.zuwang;

import com.example.demo.pojo.StorageInfo;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
public class ZuWangFromJSRes implements Serializable {

    public String device;
    public String unistr;//数据监控消息
    public String sn;
    public String transtype;
    public String ip;
    public String datetime;

    //cpu负载图
    public Cpu cpu;
    public Memory memory;
    public Env env;

    private boolean zuWangReq;

    //原始信息
    public List<Info> cpuInfo;
    public List<Info> memInfo;
    public List<StorageInfo> storageInfo;

    public String getUni(){
        return device + sn;
    }
    public String getUniIp(){
        return device + sn + ip;
    }
    @Data
    public static class Env{
        private String device;
        private String ip;
        private String sn;
        private String datetime;
    }
    @Data
    public static class Cpu{
        private String cpu_cpt;
        private float average1;
        private float average5;
        private float average10;
    }

    @Data
    public static class Memory{
        private float mem_cpt;
        private float mem_total;
        private float mem_used;
        private float mem_free;
    }
    @Data
    public static class Info {

        private String command;
        private String pid;
        private String vsz_pct;
        private String cpu;

    }


}